package br.com.ss.seguranca.model.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Entity implementation class for Entity: Usuario
 *
 */
@Entity
@Table(name = "saa_usuario")
public class Usuario implements Serializable {
	
	private static final long serialVersionUID = 8626411055461539204L;

	@Id
	@Column(name = "usuario_id", unique = true, nullable = false)
	@GeneratedValue( strategy = GenerationType.IDENTITY)
	private int id;
	
	@Column(name = "usu_nome", nullable = false, length = 60)
	private String nome;
	
	@Column(name = "usu_cpf", nullable = false, length = 11, unique=true)
	private String cpf;
	
	@Column(name = "usu_senha", nullable = true, length = 100)
	private String senha;
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "status_id", nullable = false)
	private Status status;
	
	@Column(name = "usu_email", nullable = true, length = 60)
	private String email;
	

	public Usuario() {
		super();
	}


	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}


	public String getCpf() {
		return cpf;
	}


	public void setCpf(String cpf) {
		this.cpf = cpf;
	}


	public String getSenha() {
		return senha;
	}


	public void setSenha(String senha) {
		this.senha = senha;
	}


	public Status getStatus() {
		return status;
	}


	public void setStatus(Status status) {
		this.status = status;
	}


	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getNome() {
		return nome;
	}


	public void setNome(String nome) {
		this.nome = nome;
	}
   
}
